package wzh000;
import com.google.*;
import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DiscardCardNumber {
	private String cmd;
	private List<ArrayList<Object>> cards;
	private boolean last_cards;
	
	public DiscardCardNumber(String msg, boolean lastCard){
		this.cmd = msg;
		this.last_cards = lastCard;
		//this.cards = new HashMap<List<String>, List<String>>();
		this.cards = new ArrayList<ArrayList<Object>>();
	}
	
	public void fillinCards(Card removedCard, Card card){
		ArrayList<Object> a = new ArrayList<Object>();
		a.add(Integer.parseInt(removedCard.getValue()));
		a.add(removedCard.getType());
		ArrayList<Object> b = new ArrayList<Object>();
		b.add(Integer.parseInt(card.getValue()));
		b.add(card.getType());
		this.cards.add(a);
		this.cards.add(b);
	}
	
	public static void main(String[] args) {
		DiscardCardNumber a = new DiscardCardNumber("discard", false);
		
		Card card_a = new Card();
		card_a.setType("dame");
		card_a.setValue("5");
		Card card_b = new Card();
		card_b.setType("dame");
		card_b.setValue("6");
		a.fillinCards(card_a, card_b);
		
		Gson gson = new Gson();
		String json = gson.toJson(a);
		System.out.println("test");
	}
}
